package com.dj.mingkong.admin.biz.controller.music.vo.request;

import jakarta.validation.Valid;
import jakarta.validation.constraints.*;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.URL;

import java.io.Serializable;
import java.util.List;

/**
 * 音乐VO
 *
 * @author zenglonghui
 * @date: 2022/8/5 15:36
 */
@Data
@Accessors(chain = true)
public class MusicAddVo implements Serializable {
    /**
     * 音乐名称
     */
    @NotBlank(message = "name can not be blank")
    @Size(min = 1, max = 90, message = "name invalid")
    private String name;

    /**
     * 音乐风格id
     */
    @NotNull(message = "styleId can not be null")
    private Long styleId;

    /**
     * 音乐类型id
     */
    @NotNull(message = "typeId can not be null")
    private Long typeId;

    /**
     * 来自于 0原创 1网络
     */
    @Max(value = 1, message = "beFrom invalid")
    @Min(value = 0, message = "beFrom invalid")
    private Integer beFrom;

    /**
     * 是否独家 0否 1是
     */
    @Max(value = 1, message = "isExclusive invalid")
    @Min(value = 0, message = "isExclusive invalid")
    private Integer isExclusive;

    /**
     * 是否推荐 0否 1是
     */
    @Max(value = 1, message = "isRecommend invalid")
    @Min(value = 0, message = "isRecommend invalid")
    private Integer isRecommend;

    /**
     * 是否精品 0否 1是
     */
    @Max(value = 1, message = "isBoutique invalid")
    @Min(value = 0, message = "isBoutique invalid")
    private Integer isBoutique;

    /**
     * 是否车载 0否 1是
     */
    @Max(value = 1, message = "isVehicle invalid")
    @Min(value = 0, message = "isVehicle invalid")
    private Integer isVehicle;

    /**
     * 音乐时长
     */
    @NotBlank(message = "howLong can not be blank")
    @Size(min = 1, max = 18, message = "howLong invalid")
    private String howLong;

    /**
     * 音乐封面
     */
    @NotBlank(message = "cover can not be blank")
    @Size(min = 1, max = 230, message = "cover invalid")
    @URL(message = "cover invalid")
    private String cover;

    /**
     * 语言key
     */
    @NotBlank(message = "languageKey can not be blank")
    @Size(min = 1, max = 190, message = "languageKey invalid")
    private String languageKey;

    /**
     * 导航key
     */
    @NotBlank(message = "navMenuKey can not be blank")
    @Size(min = 1, max = 190, message = "navMenuKey invalid")
    private String navMenuKey;

    /**
     * 描述
     */
    @Size(min = 1, max = 240, message = "description invalid")
    private String description;

    @NotEmpty(message = "musicResourceAddVoList can not be empty")
    private List<MusicResourceAddVo> musicResourceAddVoList;

    @NotNull(message = "musicReviewAddVo can not be null")
    @Valid
    private MusicReviewAddVo musicReviewAddVo;

    @NotEmpty(message = "albumIdList can not be empty")
    @Size(min = 1, message = "albumIdList invalid")
    private List<Long> albumIdList;
}
